-
Notifications
You must be signed in to change notification settings - Fork 0
Fix multiline Text rendering bug and add DocC documentation #3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Bug Fix (Issue #2): - RenderEngine.render() now splits multiline Text content on newlines - Previously returned single array element causing truncation in borders Documentation: - Add DocC catalogs for all 9 modules with landing pages - Update GitHub Actions workflow to build docs for each module - Merge module docs into combined documentation site
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR addresses a multiline text rendering bug and adds comprehensive DocC documentation for all modules in the swift-cli package.
Key Changes:
- Fixes bug in
RenderEngine.render()where multiline Text content was truncated by splitting rendered text on newlines while preserving empty lines - Adds DocC documentation catalogs with landing pages for all 9 modules (ANSI, TerminalCore, TerminalStyle, TerminalInput, TerminalLayout, TerminalComponents, TerminalGraphics, TerminalUI, and CLI)
- Updates GitHub Actions workflow to build documentation for each module and merge them into a unified documentation site
Reviewed changes
Copilot reviewed 11 out of 11 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| Sources/TerminalUI/RenderEngine.swift | Fixes multiline Text rendering by splitting on newlines instead of returning single-element array |
| Sources/ANSI/Documentation.docc/ANSI.md | Adds DocC landing page for ANSI module covering escape sequences, cursor control, colors, and styles |
| Sources/TerminalCore/Documentation.docc/TerminalCore.md | Adds DocC landing page for TerminalCore module covering terminal I/O operations and capabilities |
| Sources/TerminalStyle/Documentation.docc/TerminalStyle.md | Adds DocC landing page for TerminalStyle module covering text styling and gradients |
| Sources/TerminalInput/Documentation.docc/TerminalInput.md | Adds DocC landing page for TerminalInput module covering keyboard/mouse input and line editing |
| Sources/TerminalLayout/Documentation.docc/TerminalLayout.md | Adds DocC landing page for TerminalLayout module covering boxes, tables, and tree views |
| Sources/TerminalComponents/Documentation.docc/TerminalComponents.md | Adds DocC landing page for TerminalComponents module covering progress bars, spinners, and prompts |
| Sources/TerminalGraphics/Documentation.docc/TerminalGraphics.md | Adds DocC landing page for TerminalGraphics module covering terminal image protocols |
| Sources/TerminalUI/Documentation.docc/TerminalUI.md | Adds DocC landing page for TerminalUI module covering SwiftUI-inspired TUI framework |
| Sources/CLI/Documentation.docc/CLI.md | Adds DocC landing page for CLI umbrella module covering complete framework architecture |
| .github/workflows/docs.yml | Updates workflow to build and merge documentation for all 8 modules plus CLI umbrella |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| generate-documentation --target $target \ | ||
| --disable-indexing \ | ||
| --transform-for-static-hosting \ | ||
| --hosting-base-path swift-cli/$target \ |
Copilot
AI
Nov 29, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The --hosting-base-path for individual modules is set to swift-cli/$target, but these docs are then merged into the main docs folder which has --hosting-base-path swift-cli. This mismatch in base paths could cause broken links when the module documentation is merged into the main documentation. The module docs should use the same base path as the CLI docs (swift-cli) or be placed in subfolders that respect the base path structure.
| --hosting-base-path swift-cli/$target \ | |
| --hosting-base-path swift-cli \ |
| - name: Build Documentation | ||
| run: | | ||
| # Generate documentation for each module | ||
| for target in ANSI TerminalCore TerminalStyle TerminalInput TerminalLayout TerminalComponents TerminalGraphics TerminalUI; do |
Copilot
AI
Nov 29, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The list of targets is duplicated in lines 28 and 46. Consider defining this list once as a variable at the start of the script to avoid maintenance issues if modules are added or removed. For example:
MODULES="ANSI TerminalCore TerminalStyle TerminalInput TerminalLayout TerminalComponents TerminalGraphics TerminalUI"
for target in $MODULES; do
...
done
Bug Fix (Issue #2):
Documentation: